package com.whfc.fmam.entity.enums;

/**
 * @Description:
 * @author: qzexing
 * @version: 1.0
 * @date: 2020/4/26 16:12
 */
public enum WeighNoteConfirmType {

    DELIVERY_WEIGH(0, "运单量"),

    ACTUAL_WEIGHT(1, "实际量"),

    MINIMUM_WEIGHT(2, "最小值"),

    INPUT_WEIGH(3, "输入量");

    private Integer value;

    private String desc;

    WeighNoteConfirmType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static WeighNoteConfirmType parseValue(Integer value) {
        switch (value) {
            case 0:
                return DELIVERY_WEIGH;
            case 1:
                return ACTUAL_WEIGHT;
            case 2:
                return MINIMUM_WEIGHT;
            case 3:
                return INPUT_WEIGH;
            default:
                return null;
        }
    }
}
